<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div>
        <input type="button" value="按钮1" v-on:click="f()">
        <input type="button" value="按钮2" @click="ff()">
        {{info}}
    </div>
    <script src="../js/vue.js"></script>
    <script>
        let v = new Vue({
            el : "div",
            data : {info : "事件绑定"},
            methods : { /* 在methods中声明事件触发的方法 */
                f : function () {
                    v.info = "按钮1点击了";
                },
                ff() {
                    v.info = "按钮2点击了";
                }
            }
        })
    </script>
</body>
</html>